package com.zy.explore.sys.infrastructure.third.dingtalk.frm;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * description 打卡考勤列表请求Frm
 *
 * @author 🇨🇳中国印🇨🇳
 * @date 2021年07月08日 02:59
 */
@ApiModel("打卡考勤列表请求Frm")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AttendListFrm {

    @ApiModelProperty(value = "查询考勤打卡记录的起始工作日。格式为yyyy-MM-dd HH:mm:ss", required = true, example = "2021-05-20 00:00:00")
    @NotBlank(message = "workDateFrom不能为空")
    private String workDateFrom;

    @ApiModelProperty(value = "查询考勤打卡记录的结束工作日。格式为yyyy-MM-dd HH:mm:ss", required = true, example = "2021-05-20 23:59:59")
    private String workDateTo;

    @ApiModelProperty(value = "钉钉用户ID集合", required = true, example = "[\"manager4220\"]")
    @NotEmpty(message = "userIdList不能为空集")
    private List<String> userIdList;

    @ApiModelProperty(value = "表示获取考勤数据的起始点。第一次传0，如果还有多余数据，下次获取传的offset值为之前的offset+limit，0、1、2...依次递增。", required = true, example = "0")
    @NotNull(message = "offset不能为空")
    private Integer offset;

    @ApiModelProperty(value = "表示获取考勤数据的条数，最大不能超过50条。", required = true, example = "10")
    @NotNull(message = "limit不能为空")
    @Max(value = 50, message = "limit最大不能超过50")
    private Integer limit;

    @ApiModelProperty("是否为海外企业使用 true:是 false:否")
    private Boolean isI18n;

}
